'use strict'
import request from '@/utils/request'

/**
 * 字典
 */
export function getDictByCode(dictCode) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysDictionary/getDictByCode',
    method: 'POST',
    data: { dictCode }
  })
}

/**
 * 列表查询
 */
export function queryPage(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/consultativeLog/queyrPage',
    method: 'post',
    data
  })
}
/**
 * 获取栏目树形列表
 */
export function fetchList(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/a/platform/questionColumn/query',
    method: 'POST',
    data
  })
}

/**
 * 查询回复
 */
export function query(data, url) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/consultativeLog/get',
    method: 'post',
    data
  })
}

/**
 * 回复
 */
export function replay(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/consultativeLog/insert',
    method: 'post',
    data
  })
}

/**
 * 删除精选
 */
export function del(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/a/platform/quesBackFeed/deleteQuestion',
    method: 'post',
    data
  })
}

/**
 * 转办 选择赛区
 */
export function queryArea(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    // url: '/backend/a/megagame/megagameZone/queryChildrenMegagameZone',
    url: '/backend/a/megagame/megagameZone/queryMegagameZone',
    method: 'post',
    data
  })
}

/**
 * 获取部门权限树(异步)
 */

export function getOrgTreeSync(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    // url: '/backend/a/platform/sysOrg/queryOrg',
    url: '/backend/a/megagame/megagameZone/queryMegagameZone',
    method: 'post',
    data
  })
}
/**
 * 转办
 */
export function returnArea(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/a/platform/quesBackFeed/updateQuestion',
    method: 'post',
    data
  })
}
